﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TalentTypesAdmin.ascx.cs"
    Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.OpenPersonality.TalentTypesAdmin" %>
<owc:OwGrid ID="TalentTypeGrid" runat="server" DataSourceID="TalentTypeOds" SkinID="OwGridAdmin">
    <MasterTableView DataSourceID="TalentTypeOds" CommandItemDisplay="Top" DataKeyNames="TalentTypeID">
        <CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="<%$OwR:AddNewRecordText %>"
            RefreshText="<%$ OwR:RefreshText %>"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
        <Columns>
            <owct:GridBoundColumn DataField="TalentTypeID" DataType="System.Int64" FilterControlAltText="Filter TalentTypeID column"
                HeaderText="<%$OwR:Code %>" SortExpression="TalentTypeID" UniqueName="TalentTypeID">
            </owct:GridBoundColumn>
            <owct:GridBoundColumn DataField="Name" FilterControlAltText="Filter Name column"
                HeaderText="<%$OwR:Name %>" SortExpression="Name" UniqueName="Name">
            </owct:GridBoundColumn>
            <owct:GridBoundColumn DataField="LanguageCode" FilterControlAltText="Filter LanguageCode column"
                HeaderText="<%$OwR:Language %>" SortExpression="LanguageCode" UniqueName="LanguageCode">
            </owct:GridBoundColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$OwR:Parent %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <%#OwTalentTypesBLL.OwGetEntity((long?)Eval("ParentID")).Name%>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$OwR:Modify %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <div align="center">
                        <a href='/Admin/Views/Site/TalentTypesEdit.aspx?ID=<%#Eval("TalentTypeID")%>'>
                            <img src='/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/edit.gif' runat="server"
                                id="UpdateImage" /></a>
                    </div>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$OwR:Delete %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <div align="center">
                        <asp:ImageButton CausesValidation="true" OnClientClick='if(!confirm("Are you sure to  Delete?")) return false'
                            ID="EditDeleteButton1" CommandName="Delete" runat="server" SkinID="OwConfirmButton"
                            ImageUrl="/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/delete.gif" />
                    </div>
                </ItemTemplate>
            </owct:GridTemplateColumn>
        </Columns>
        <EditFormSettings EditFormType="Template">
            <FormTemplate>
                <%
                    Response.Redirect("TalentTypesEdit.aspx");
                %>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
</owc:OwGrid>
<owc:OwObjectDataSource ID="TalentTypeOds" runat="server" DataObjectTypeName="Micronet.OpenWeb.Entity.OwTalentTypesEntity"
    DeleteMethod="OwDelete" InsertMethod="OwInsert" OldValuesParameterFormatString="original_{0}"
    SelectMethod="OwGetByDynamic" TypeName="Micronet.OpenWeb.Com.BLL.OwTalentTypesBLL"
    SelectCountMethod="OwGetByDynamicCount" EnablePaging="true" UpdateMethod="OwUpdate">
    <SelectParameters>
        <asp:Parameter Name="parentID" Type="Int64" />
        <asp:Parameter Name="languageCode" Type="String" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>
